import Vue from "vue";
import Vuex from "vuex";
import user from "./modules/user";
import createPersistedState from "vuex-persistedstate";
import getters from "@/store/getters";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {},
  mutations: {},
  actions: {},
  modules: { user },
  plugins: [
    createPersistedState({
      paths: ["user.token", "user.userInfo"],
    }),
  ],
  getters,
});
